home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / f90 / ieee_real.z / ieee_real
Text File  |  1998-10-30  |  4KB  |  96 lines

  1. IEEE_REAL(3I)                                          Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      IIEEEEEE__RREEAALL - Converts _x to a real value
  6.  
  7. SSYYNNOOPPSSIISS
  8.      IIEEEEEE__RREEAALL (([XX==]_x [,, [YY==]_y]))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS/mk and IRIX systems
  12.  
  13.      CRAY T90 systems that support IEEE floating-point arithmetic
  14.  
  15. SSTTAANNDDAARRDDSS
  16.      CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
  17.  
  18.      IEEE Standard for Binary Floating-point Arithmetic
  19.  
  20. DDEESSCCRRIIPPTTIIOONN
  21.      The IIEEEEEE__RREEAALL intrinsic function converts _x to a real value according
  22.      to the rounding mode currently in effect.  It accepts the following
  23.      arguments:
  24.  
  25.      _x         Can be of type real or integer.  It can be scalar or an
  26.                array.
  27.  
  28.      _y         If specified, must be scalar and of type real.
  29.  
  30.      IIEEEEEE__RREEAALL is an elemental function.  The name of this intrinsic cannot
  31.      be passed as an argument.
  32.  
  33. NNOOTTEESS
  34.      The IEEE intrinsic procedures use the named constants contained in a
  35.      system module, so you must include one of the following statements in
  36.      your program:
  37.  
  38.      * On UNICOS and UNICOS/mk systems:  UUSSEE CCRRII__IIEEEEEE__DDEEFFIINNIITTIIOONNSS
  39.  
  40.      * On UNICOS, UNICOS/mk, and IRIX systems:  UUSSEE FFTTNN__IIEEEEEE__DDEEFFIINNIITTIIOONNSS
  41.  
  42.      The CCRRII__IIEEEEEE__DDEEFFIINNIITTIIOONNSS module is obsolescent.  It will be removed
  43.      for the CF90 4.0 release.
  44.  
  45. RREETTUURRNN VVAALLUUEESS
  46.      The result type and type parameters are as follows.  If _y is absent,
  47.      the result type and type parameter are default real.  If _y is present,
  48.      the result type and type parameter are the same type and type
  49.      parameter as _y.  If _x is an array, the result is an array of the same
  50.      shape as _x.
  51.  
  52.      If _y is absent, the result is a default real rounded from _x according
  53.      to the rounding mode currently in effect.  When _x is of type integer,
  54.      this form of IIEEEEEE__RREEAALL is useful for converting an integer value that
  55.      has more significant bits than the number of bits in the mantissa of
  56.      the default real format or the format of _y.  IIEEEEEE__RREEAALL, in this case,
  57.      rounds the integer according to the number of bits in the mantissa.
  58.      For example, suppose that on some machine an integer can hold 5
  59.      decimal digits, but the floating-point format of the same size can
  60.      only hold 4.  The result of IIEEEEEE__RREEAALL((1100112266)) on this machine would be
  61.      1.013E+3 if the current rounding mode is round-to-nearest.  This form
  62.      of IIEEEEEE__RREEAALL is also useful when converting a double precision _y to
  63.      (default) single precision and, in the process, rounding the
  64.      fractional value in the mantissa according to the rounding mode
  65.      currently in effect.
  66.  
  67.      If _y is present, the result is of type real with the same kind type
  68.      parameter value as _y and whose value is rounded from _x according to
  69.      the rounding mode currently in effect.  This form of IIEEEEEE__RREEAALL has
  70.      essentially the same uses as those described in the previous
  71.      paragraph, but it allows you to specify a result type of something
  72.      other than default real.  For example, this form would be useful to
  73.      convert quad precision real to double precision (and rounding in the
  74.      process) on IRIX systems.
  75.  
  76.      If _x is scalar, the result is scalar.
  77.  
  78.      If _x is an array, the result is an array in which each element is the
  79.      value of _x  rounded to the type and type parameter of _y.
  80.                _i
  81. EEXXAAMMPPLLEESS
  82.           ! Assume that the following program is compiled and executed on
  83.           ! a 32-bit machine.
  84.           INTEGER k
  85.           ...                     ! X is filled with a value that
  86.           ...                     ! has more than 23 significant bits.
  87.           PRINT *, IEEE_REAL(k)
  88.  
  89.      Variable kk is converted to type default real and rounded to fit into
  90.      23 bits according to the rounding mode currently in effect.
  91.  
  92. SSEEEE AALLSSOO
  93.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  94.      printed version of this man page.
  95.  
  96.